'use strict';

function double_to_one(collection) {
  let arr=collection.reduce(
    function reduced(a,b){
      return a.concat(b);
    },[]
  );
  let arr1=arr.filter(
    function filtered(element,index,array){
      return array.indexOf(element)===index;
    }
  );
  return arr1;
  //在这里写入代码
}

module.exports = double_to_one;
